package com.huanletao.number;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

public class demo {
    public static void main(String[] args) {
        BigDecimal d = new BigDecimal("0.12111234135");
        d.setScale(6,BigDecimal.ROUND_HALF_UP);
        String format = new DecimalFormat("#.##%", DecimalFormatSymbols.getInstance()).format(d);
        System.out.println("format = " + format);
    }
}
